//
// CFlareShape.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CRGBA;
import org.ryzom.nel.misc.IStream;

public class CFlareShape {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CFlareShape(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CFlareShape obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CFlareShape(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public CFlareShape() {
    this(nel3dJNI.new_CFlareShape(), true);
  }

  public void serial(IStream f) {
    nel3dJNI.CFlareShape_serial(swigCPtr, this, IStream.getCPtr(f), f);
  }

  public CTransformShape createInstance(CScene scene) {
    long cPtr = nel3dJNI.CFlareShape_createInstance(swigCPtr, this, CScene.getCPtr(scene), scene);
    return (cPtr == 0) ? null : new CTransformShape(cPtr, false);
  }

  public boolean clip(SWIGTYPE_p_std__vectorT_NLMISC__CPlane_t pyramid, SWIGTYPE_p_NLMISC__CMatrix worldMatrix) {
    return nel3dJNI.CFlareShape_clip(swigCPtr, this, SWIGTYPE_p_std__vectorT_NLMISC__CPlane_t.getCPtr(pyramid), SWIGTYPE_p_NLMISC__CMatrix.getCPtr(worldMatrix));
  }

  public void render(IDriver arg0, CTransformShape arg1, boolean arg2) {
    nel3dJNI.CFlareShape_render(swigCPtr, this, IDriver.getCPtr(arg0), arg0, CTransformShape.getCPtr(arg1), arg1, arg2);
  }

  public void getAABBox(SWIGTYPE_p_NLMISC__CAABBox bbox) {
    nel3dJNI.CFlareShape_getAABBox(swigCPtr, this, SWIGTYPE_p_NLMISC__CAABBox.getCPtr(bbox));
  }

  public float getNumTriangles(float distance) {
    return nel3dJNI.CFlareShape_getNumTriangles(swigCPtr, this, distance);
  }

  public void flushTextures(IDriver driver, long selectedTexture) {
    nel3dJNI.CFlareShape_flushTextures(swigCPtr, this, IDriver.getCPtr(driver), driver, selectedTexture);
  }

  public void setTexture(long index, ITexture tex) {
    nel3dJNI.CFlareShape_setTexture(swigCPtr, this, index, ITexture.getCPtr(tex), tex);
  }

  public ITexture getTexture(long index) {
    long cPtr = nel3dJNI.CFlareShape_getTexture__SWIG_0(swigCPtr, this, index);
    return (cPtr == 0) ? null : new ITexture(cPtr, false);
  }

  public void setSize(long index, float size) {
    nel3dJNI.CFlareShape_setSize(swigCPtr, this, index, size);
  }

  public float getSize(long index) {
    return nel3dJNI.CFlareShape_getSize(swigCPtr, this, index);
  }

  public void setRelativePos(long index, float pos) {
    nel3dJNI.CFlareShape_setRelativePos(swigCPtr, this, index, pos);
  }

  public float getRelativePos(long index) {
    return nel3dJNI.CFlareShape_getRelativePos(swigCPtr, this, index);
  }

  public void setColor(CRGBA col) {
    nel3dJNI.CFlareShape_setColor(swigCPtr, this, CRGBA.getCPtr(col), col);
  }

  public CRGBA getColor() {
    return new CRGBA(nel3dJNI.CFlareShape_getColor(swigCPtr, this), true);
  }

  public void setFlareSpacing(float spacing) {
    nel3dJNI.CFlareShape_setFlareSpacing(swigCPtr, this, spacing);
  }

  public float getFlareSpacing() {
    return nel3dJNI.CFlareShape_getFlareSpacing(swigCPtr, this);
  }

  public void setPersistence(float persistence) {
    nel3dJNI.CFlareShape_setPersistence(swigCPtr, this, persistence);
  }

  public float getPersistence() {
    return nel3dJNI.CFlareShape_getPersistence(swigCPtr, this);
  }

  public void setAttenuable(boolean enable) {
    nel3dJNI.CFlareShape_setAttenuable__SWIG_0(swigCPtr, this, enable);
  }

  public void setAttenuable() {
    nel3dJNI.CFlareShape_setAttenuable__SWIG_1(swigCPtr, this);
  }

  public boolean getAttenuable() {
    return nel3dJNI.CFlareShape_getAttenuable(swigCPtr, this);
  }

  public void setAttenuationRange(float range) {
    nel3dJNI.CFlareShape_setAttenuationRange(swigCPtr, this, range);
  }

  public float getAttenuationRange() {
    return nel3dJNI.CFlareShape_getAttenuationRange(swigCPtr, this);
  }

  public void setFirstFlareKeepSize(boolean enable) {
    nel3dJNI.CFlareShape_setFirstFlareKeepSize__SWIG_0(swigCPtr, this, enable);
  }

  public void setFirstFlareKeepSize() {
    nel3dJNI.CFlareShape_setFirstFlareKeepSize__SWIG_1(swigCPtr, this);
  }

  public boolean getFirstFlareKeepSize() {
    return nel3dJNI.CFlareShape_getFirstFlareKeepSize(swigCPtr, this);
  }

  public void enableDazzle(boolean enable) {
    nel3dJNI.CFlareShape_enableDazzle__SWIG_0(swigCPtr, this, enable);
  }

  public void enableDazzle() {
    nel3dJNI.CFlareShape_enableDazzle__SWIG_1(swigCPtr, this);
  }

  public boolean hasDazzle() {
    return nel3dJNI.CFlareShape_hasDazzle(swigCPtr, this);
  }

  public void setDazzleColor(CRGBA col) {
    nel3dJNI.CFlareShape_setDazzleColor(swigCPtr, this, CRGBA.getCPtr(col), col);
  }

  public CRGBA getDazzleColor() {
    return new CRGBA(nel3dJNI.CFlareShape_getDazzleColor(swigCPtr, this), true);
  }

  public void setDazzleAttenuationRange(float range) {
    nel3dJNI.CFlareShape_setDazzleAttenuationRange(swigCPtr, this, range);
  }

  public float getDazzleAttenuationRange() {
    return nel3dJNI.CFlareShape_getDazzleAttenuationRange(swigCPtr, this);
  }

  public void setMaxViewDist(float dist) {
    nel3dJNI.CFlareShape_setMaxViewDist(swigCPtr, this, dist);
  }

  public float getMaxViewDist() {
    return nel3dJNI.CFlareShape_getMaxViewDist(swigCPtr, this);
  }

  public void setMaxViewDistRatio(float ratio) {
    nel3dJNI.CFlareShape_setMaxViewDistRatio(swigCPtr, this, ratio);
  }

  public float getMaxViewDistRatio() {
    return nel3dJNI.CFlareShape_getMaxViewDistRatio(swigCPtr, this);
  }

  public void setFlareAtInfiniteDist(boolean enabled) {
    nel3dJNI.CFlareShape_setFlareAtInfiniteDist__SWIG_0(swigCPtr, this, enabled);
  }

  public void setFlareAtInfiniteDist() {
    nel3dJNI.CFlareShape_setFlareAtInfiniteDist__SWIG_1(swigCPtr, this);
  }

  public boolean getFlareAtInfiniteDist() {
    return nel3dJNI.CFlareShape_getFlareAtInfiniteDist(swigCPtr, this);
  }

  public void set_DefaultPos(CTrackDefaultVector value) {
    nel3dJNI.CFlareShape__DefaultPos_set(swigCPtr, this, CTrackDefaultVector.getCPtr(value), value);
  }

  public CTrackDefaultVector get_DefaultPos() {
    return new CTrackDefaultVector(nel3dJNI.CFlareShape__DefaultPos_get(swigCPtr, this), true);
  }

  public CTrackDefaultVector getDefaultPos() {
    long cPtr = nel3dJNI.CFlareShape_getDefaultPos(swigCPtr, this);
    return (cPtr == 0) ? null : new CTrackDefaultVector(cPtr, false);
  }

  public void setOcclusionTestMeshName(String shapeName) {
    nel3dJNI.CFlareShape_setOcclusionTestMeshName(swigCPtr, this, shapeName);
  }

  public String getOcclusionTestMeshName() {
    return nel3dJNI.CFlareShape_getOcclusionTestMeshName(swigCPtr, this);
  }

  public CMesh getOcclusionTestMesh(CShapeBank sb) {
    long cPtr = nel3dJNI.CFlareShape_getOcclusionTestMesh(swigCPtr, this, CShapeBank.getCPtr(sb), sb);
    return (cPtr == 0) ? null : new CMesh(cPtr, false);
  }

  public void setOcclusionTestMeshInheritScaleRot(boolean on) {
    nel3dJNI.CFlareShape_setOcclusionTestMeshInheritScaleRot(swigCPtr, this, on);
  }

  public boolean getOcclusionTestMeshInheritScaleRot() {
    return nel3dJNI.CFlareShape_getOcclusionTestMeshInheritScaleRot(swigCPtr, this);
  }

  public void setScaleWhenDisappear(boolean enable) {
    nel3dJNI.CFlareShape_setScaleWhenDisappear(swigCPtr, this, enable);
  }

  public boolean getScaleWhenDisappear() {
    return nel3dJNI.CFlareShape_getScaleWhenDisappear(swigCPtr, this);
  }

  public void setSizeDisappear(float size) {
    nel3dJNI.CFlareShape_setSizeDisappear(swigCPtr, this, size);
  }

  public void setAngleDisappear(float angle) {
    nel3dJNI.CFlareShape_setAngleDisappear(swigCPtr, this, angle);
  }

  public float getSizeDisappear() {
    return nel3dJNI.CFlareShape_getSizeDisappear(swigCPtr, this);
  }

  public float getAngleDisappear() {
    return nel3dJNI.CFlareShape_getAngleDisappear(swigCPtr, this);
  }

  public void setLookAtMode(boolean on) {
    nel3dJNI.CFlareShape_setLookAtMode(swigCPtr, this, on);
  }

  public boolean getLookAtMode() {
    return nel3dJNI.CFlareShape_getLookAtMode(swigCPtr, this);
  }

}
